package com.yb.domain.goods;

// default package

import java.text.SimpleDateFormat;
import java.util.Date;

import com.yb.base.annotation.Column;
import com.yb.base.annotation.Table;
import com.yb.base.entity.BaseEntity;
import com.yb.util.comm.DateTimeUtil;

/**
 * TgBrandMember entity. 拼抢记录表
 * 
 * @author MyEclipse Persistence Tools
 */
@Table("t_g_brand_member")
public class TgBrandMember extends BaseEntity implements java.io.Serializable {

	// Fields

	private String name;
	private String sex;
	private String tel;
	private String email;
	private String qq;
	private Integer brandId;
	private Date joinDate;
	private Date createTime;
	@Column(name = "reject")
	private String brandName;
	@Column(name = "reject")
	private String creatTimeStr;
	@Column(name = "reject")
	private String creatTimeString;//创建日期
	private String telephoe;
	private String type;
	private String code;
	private String address;
	private String goodId;
	private int userId;

	@Column(name = "reject")
	private String showName;

	@Column(name = "reject")
	private String joinDateFormat;

	public String getJoinDateFormat() {
		if (null != joinDate) {
			joinDateFormat = new SimpleDateFormat("MM月dd日kk时").format(joinDate);
		}
		return joinDateFormat;
	}

	public void setJoinDateFormat(String joinDateFormat) {
		this.joinDateFormat = joinDateFormat;
	}

	public int getUserId() {
		return userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	public String getGoodId() {
		return goodId;
	}

	public void setGoodId(String goodId) {
		this.goodId = goodId;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSex() {
		return this.sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public String getTel() {
		return this.tel;
	}

	public void setTel(String tel) {
		this.tel = tel;
	}

	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getQq() {
		return this.qq;
	}

	public void setQq(String qq) {
		this.qq = qq;
	}

	public Integer getBrandId() {
		return this.brandId;
	}

	public void setBrandId(Integer brandId) {
		this.brandId = brandId;
	}

	public Date getJoinDate() {
		return this.joinDate;
	}
	
	public String getJoinDateString() {
		if(null != joinDate){
			return DateTimeUtil.getDateToString(joinDate,"yyyy-MM-dd HH:mm:ss");
		}
		return "";
	}

	public void setJoinDate(Date joinDate) {
		this.joinDate = joinDate;
	}

	public String getBrandName() {
		return brandName;
	}

	public void setBrandName(String brandName) {
		this.brandName = brandName;
	}

	public String getCreatTimeStr() {
		return creatTimeStr;
	}

	public void setCreatTimeStr(String creatTimeStr) {
		this.creatTimeStr = creatTimeStr;
	}

	public String getTelephoe() {
		return telephoe;
	}

	public void setTelephoe(String telephoe) {
		this.telephoe = telephoe;
	}

	public String getShowName() {
		String temp = "先生";
		if (null != sex) {
			if ("2".equals(sex))
				temp = "女士";
		}
		if (name.indexOf(" ") != -1) {
			showName = name.substring(0, name.indexOf(" ")) + temp;
		} else {
			showName = name.substring(0, 1) + temp;
		}
		return showName;
	}

	public void setShowName(String showName) {
		this.showName = showName;
	}

	public String getCreatTimeString() {
		return creatTimeString;
	}

	public void setCreatTimeString(String creatTimeString) {
		this.creatTimeString = creatTimeString;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

}